package com.csj.eurekafeign.controller;

import com.csj.eurekafeign.service.FeignServiceHi;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author:ChengshaoJie
 * @Description:
 * @Date:Created in 下午 4:47 2019/4/22 0022
 */
@RestController
public class HiController {
    //编译器报错，无视。 因为这个Bean是在程序启动的时候注入的，编译器感知不到，所以报错。
    @Autowired
    FeignServiceHi feignServiceHi;

    @GetMapping(value = "/hello")
    public String sayHi(@RequestParam String name) {
        return feignServiceHi.sayHiFromClientOne( name );
    }
}
